heap operations
Advanced
w A heap is a particular organization of elements in a range between two random access iterators [a, b). Its two key properties are:
w
w 1. *a is the largest element in the range.
w 2. *a may be removed by the pop_heap algorithm, or a new element can be added by the push_heap
w algorithm, in O(logN) time.
w
w These properties make heaps useful as priority queues.
w The heap algorithms use less than (operator<) as the default comparison. In all of the algorithms, an alternate comparison operator can be specified.